package org.mymail.config;

import java.util.HashMap;
import java.util.Properties;

// Referenced classes of package org.mymail.config:
//            IProperties

public class PopMailProperties
    implements IProperties
{

    public PopMailProperties()
    {
    }

    public Properties loadProperties()
    {
        HashMap propsValues = getPropertiesValues();
        String email = (String)propsValues.get("email");
        String host = (String)propsValues.get("host");
        String port = (String)propsValues.get("port");
        Properties props = new Properties();
        props.put("mail.pop3.user", email);
        props.put("mail.smtp.host", host);
        props.put("mail.pop3.port", port);
        props.put("mail.pop3.starttls.enable", "true");
        props.put("mail.pop3.auth", "true");
        props.put("mail.pop3.debug", "true");
        props.put("mail.pop3.socketFactory.port", port);
        props.put("mail.pop3.connectiontimeout", 18000000);
        props.put("mail.pop3.timeout", 18000000);
        props.put("mail.pop3.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
        props.put("mail.pop3.socketFactory.fallback", "false");
        return props;
    }

    private HashMap getPropertiesValues()
    {
        HashMap propsValues = new HashMap();
        propsValues.put("email", "sharath.ravindran@gmail.com");
        propsValues.put("host", "pop.gmail.com");
        propsValues.put("port", "995");
        return propsValues;
    }
}